/**
 * 
 */
package at.ac.tuwien.swa075.telco.bc.dao;

import java.util.List;

import at.ac.tuwien.swa075.telco.bc.BCException;

/**
 * @author vovmj01
 *
 */
public interface IAccountDAO {
	
	/**
	 * Deletes an existing account
	 * @param accountNumber The identifying account number.
	 * @return true if an account was deleted.
	 * @throws BCException An error occured while deleting the account.
	 */
	public boolean deleteAccount(String accountNumber) throws BCException;
	
	/**
	 * Returns all accounts for a given subscriber.
	 * @param imsi The international mobile subscriber id.
	 * @return The list of accounts.
	 * @throws BCException An error occured during search.
	 */
	public List<AccountTO> selectAccountsBySubscriber(String imsi) throws BCException;
	
	/**
	 * Returns all account with a given status.
	 * @param status The status as a string.
	 * @return The list of accounts.
	 * @throws BCException An error occured during search.
	 */
	public List<AccountTO> selectAccountsByStatus(String status) throws BCException;
	
	/**
	 * Lookup a single account identified by a single equipment id.
	 * @param imei The international mobile equipment id.
	 * @return The account.
	 * @throws BCException An error occured during lookip.
	 */
	public AccountTO findAccount(String imei) throws BCException;
	
	/**
	 * Creates a new account with the given account data.
	 * 
	 * @param account The account object.
	 * @return Returns the account number.
	 * @throws BCException An error occured while creating a new account
	 */
	public String insertAccount(AccountTO account) throws BCException;
	
	/**
	 * Updates the data of an existing account.
	 * @param account The account object.
	 * @return Returns true if data was changed.
	 * @throws BCException An error occured while updating the data.
	 */
	public boolean updateAccount(AccountTO account) throws BCException;

}
